package com.ctshk.rpc.tour.dto.schedule;

import com.ctshk.rpc.tour.dto.cache.TripGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @author pf
 */
@Data
@ApiModel(value = "SeriesTripGroupDTO对象", description = "首页分组展视对象-分组")
public class SeriesTripGroupDTO implements Serializable, Comparable<SeriesTripGroupDTO> {

    @ApiModelProperty(value = "分组id")
    private String tourTypeId;

    @ApiModelProperty(value = "分组名称")
    private String tourTypeNam;

    @ApiModelProperty(value = "分组行程列表")
    private List<TripGroup> trips;

    @Override
    public int compareTo(SeriesTripGroupDTO o) {
        return Integer.valueOf(this.getTourTypeId().substring(1)).compareTo(Integer.valueOf(o.getTourTypeId().substring(1)));
    }
}
